#include "bsp_hash.h"
static uint8_t u8HashMsgDigest[32U];
uint8_t bsp_hash_init(void)
{
    PWC_FCG0_Unlock();
    PWC_Fcg0PeriphClockCmd(PWC_FCG0_HASH, Enable);
    HASH_IntCmd(HASH_INT_ALL, Enable);
    return Ok;
}

uint8_t bsp_hmac_caculate(uint8_t *sourcedata,uint32_t datalen, uint8_t *key, uint32_t keylen,uint8_t *Digest)
{
    HMAC_Calculate(sourcedata,datalen,key,keylen,Digest);
    return Ok;
}
uint8_t bsp_hash_caulate(uint8_t *sourcedata,uint32_t datalen,uint8_t *Digest)
{
    HASH_Calculate(sourcedata,datalen,Digest);
    return Ok;
}